<!doctype html>
<html>
<head>
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width,height=device-height, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title></title>
    <style type="text/css">
        body{background: black;
            perspective: 5000px;
        }
        .eyes{
            perspective: 1000px;
        }
        .box{
            /*设置3D效果*/
            transform-style: preserve-3d;
            /*盒子的大小*/
            width: 200px;
            height: 200px;
            background: transparent;
            /*设置盒子的位置，便于观察*/
            margin: 200px auto;
            /*复合方式设置动画 三者分别为：动画名 执行一次时间 执行方式*/
            animation: zhuan 3s ease;
            /*令动画无限执行下去*/
            animation-iteration-count: infinite;
            animation-timing-function: linear;
        }
        .box div{
            width: 200px;
            height: 200px;
            opacity: 1;
            /*设置过渡*/
            transition: all 1s ease 0s;
            position: absolute;
        }
        /*调整位置，制作成一个六边形*/
        .box .div1{
            background: green;
            transform: translateZ(100px);
        }
        .box .div2{
            background: green;
            transform: translateZ(-100px);
        }
        .box .div3{
            background: green;
            transform: rotateX(90deg) translateZ(100px);
        }
        .box .div4{
            background: green;
            transform: rotateX(270deg) translateZ(100px);
        }
        .box .div5{
            background: green;
            transform: rotateY(-90deg) translateZ(100px);
        }
        .box .div6{
            background: green;
            transform: rotateY(90deg) translateZ(100px);
        }
        /*添加3D旋转效果 让其绕X、Y轴同时旋转90度*/
        @keyframes zhuan{
            from{
                transform: rotateX(0deg) rotateZ(0deg) rotateY(0deg);
            }
            to{
                transform: rotateX(360deg) rotateZ(360deg) rotateY(360deg);
            }
        }
        /*给正方体添加一个hover效果*/
        .box:hover .div1{
            transform: translateZ(200px);
        }
        .box:hover .div2{
            transform: translateZ(-200px);
        }
        .box:hover .div3{
            transform: rotateX(90deg) translateZ(200px);
        }
        .box:hover .div4{
            transform: rotateX(270deg) translateZ(200px);
        }
        .box:hover .div5{
            transform: rotateY(-90deg) translateZ(200px);
        }
        .box:hover .div6{
            transform: rotateY(90deg) translateZ(200px)
        }
    </style>
</head>
<body>
<div class="eyes">
    <div class="box">
        <div class="div1"><img src="photo/QQ图片20231018230847.jpg" width="100%" height="100%"></div>
        <div class="div2"><img src="photo/QQ图片20231018230843.jpg" width="100%" height="100%"></div>
        <div class="div3"><img src="photo/QQ图片20231018230849.jpg" width="100%" height="100%"></div>
        <div class="div4"><img src="photo/QQ图片20231018230838.jpg" width="100%" height="100%"></div>
        <div class="div5"><img src="photo/QQ图片20231018230841.jpg" width="100%" height="100%" ></div>
        <div class="div6"><img src="photo/user.jpg" width="100%" height="100%" ></div>
    </div>
</div>
</body>
</html>